
package com.admissions.network;

import android.os.AsyncTask;

import com.admissions.CallBack;

/**
 * @author Bkav-DangNVb
 *
 */
public class DataHelper extends AsyncTask<Void, Void, Void> {
    private CallBack mCallBack;

    public DataHelper(CallBack callback) {
        this.mCallBack = callback;
    }

    @Override
    protected void onPreExecute() {
        super.onPreExecute();
        mCallBack.start();
    }

    @Override
    protected Void doInBackground(Void... params) {
        mCallBack.doWorks();
        return null;
    }

    @Override
    protected void onPostExecute(Void result) {
        super.onPostExecute(result);
        mCallBack.onFinish();
    }

}
